<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="misc.Configurations"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title><%=Configurations.title%>Homepage</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body id="homepage">
<table border="0">
    <tr>
        <td><img src="images/upload_icon.png"/></td>
        <td>
            <div class="bigtitle"><%=Configurations.name%></div><br/>
            <div class="littletitle">A free hosting service for storing and sharing your school files!</div><br/>
            <div class="littletitle"><br/><small>Developed by Lim Ching Lih and Xuechong Han of Group 45</small></div>
        </td>
    </tr>
</table>
<table border="0">
    <tr>
        <td width="600px">
            <iframe src="Upload.jsp" width="100%" height="300" frameborder="0"></iframe>
        </td>
        <td valign="top" style="padding-top:10px;">
            <h1>Login for registered users</h1>
            <%
            if(request.getParameter("status")!=null)
            {
                if(request.getParameter("status").equalsIgnoreCase("bad"))
                {
                %>
                <div class="error">Username/password is incorrect or incomplete!</div>   
                <%
                }
                else if(request.getParameter("status").equalsIgnoreCase("error"))
                {
                %>
                <div class="error">The server encounters an unknown error. :-(</div>   
                <%
                }
                else if(request.getParameter("status").equalsIgnoreCase("sessionfail"))
                {
                %>
                <div class="error">The page you attempted to access is for registered users only. Please login.</div>   
                <%
                }
            }
            %>
            <form action="Login.jsp" method="post">
                <table border="0">
                    <tr>
                      <td>Username</td><td><input type="text" name="username"/></td>
                    </tr>
                    <tr>
                      <td>Password</td><td><input type="password" name="password"/></td>
                    </tr>
                    <tr>
                      <td colspan="2" align="right"><input type="submit" value="Login"/></td>
                    </tr>
                </table>
            </form>
            <b>A few benefits of a registered user:</b><br/>
            <ul>
                <li>Upload files of unlimited size!</li>
                <li>Download files an unlimited number of times!</li>
                <li>Add a password to your uploaded file!</li>
                <li>And <a href="Register.jsp" target="_blank">register now</a> to get more benefits!</li>    
            </ul>
       </td>
    </tr>
    <tr>
        <td colspan="2">
            <iframe src="DownloadForm.jsp" width="100%" height="300" frameborder="0"></iframe>
        </td>
    </tr>
</table>
</body>
</html>